package com.bamboo.framework.framework.security.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 菜单角色关联表
 * </p>
 *
 * @author 郭晴
 * @since 2018-12-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class RoleMenu extends Model<RoleMenu> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 角色id
     */
    @TableField("roleId")
    private Integer roleId;

    /**
     * 菜单表id
     */
    @TableField("menuId")
    private Integer menuId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
